package com.atguigu.gmall.order.client;


import com.atguigu.gmall.common.result.Result;
import com.atguigu.gmall.model.order.OrderInfo;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;

import javax.servlet.http.HttpServletRequest;

@FeignClient(name = "service-order")
public interface OrderFeignClient {

    //生成结算号
    @GetMapping("/api/order/auth/trade")
    public Result trade();

    //根据订单Id查询订单信息
    @GetMapping("/api/order/getOrderInfo/{orderId}")
    public Result getOrderInfo(@PathVariable(name = "orderId") Long orderId);

    //根据订单Id查询订单信息
    @GetMapping("/api/order/getOrderInfoById/{orderId}")
    public OrderInfo getOrderInfoById(@PathVariable(name = "orderId") Long orderId);
}
